package com.synergy.stockflow.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "bom")
public class Bom {
    /**
     * BOM编号
     */
    @TableId(value = "bom_id", type = IdType.ASSIGN_ID)
    @Schema(description="BOM编号")
    private String bomId;

    /**
     * 物料id
     */
    @TableField(value = "material_id")
    @Schema(description="物料id")
    private String materialId;

    /**
     * 物料名称
     */
    @TableField(value = "material_name")
    @Schema(description="物料名称")
    private String materialName;

    /**
     * 原料ID
     */
    @TableField(value = "specifications_and_models")
    @Schema(description="原料ID")
    private String specificationsAndModels;

    /**
     * 单位
     */
    @TableField(value = "unit")
    @Schema(description="单位")
    private String unit;

    /**
     * 使用比例
     */
    @TableField(value = "material_ratio")
    @Schema(description="使用比例")
    private BigDecimal materialRatio;

    /**
     * 创建时间
     */
    @TableField(value = "creation_time")
    @Schema(description="创建时间")
    private Date creationTime;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    @Schema(description="创建者")
    private String createBy;

    /**
     * 修改者
     */
    @TableField(value = "update_by")
    @Schema(description="修改者")
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @Schema(description="修改时间")
    private Date updateTime;

    /**
     * 备注
     */
    @TableField(value = "remark")
    @Schema(description="备注")
    private String remark;

    @TableField(exist = false)
    private List<Bom> children;
}